package com.pengtu.gsj.service.impl.gcjs;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.pengtu.gsj.dao.base.Page;
import com.pengtu.gsj.dao.base.QueryFilter;
import com.pengtu.gsj.dao.check.gcjs.XXRoadConstructionBDao;
import com.pengtu.gsj.entity.gcjs.XXRoadConstructionB;
import com.pengtu.gsj.service.gcjs.XXRoadConstructionBService;

/**
 * 
 * 
 * XXRoadConstructionBServiceImpl
 * 
 * 2017年5月26日 下午2:00:35
 * 
 * @version 1.0.0
 *
 */
@Transactional
@Service
public class XXRoadConstructionBServiceImpl implements XXRoadConstructionBService {

	@Autowired
	private XXRoadConstructionBDao xXRoadConstructionBDao;

	@Override
	public List<XXRoadConstructionB> getXXRoadConstructionBs(QueryFilter queryFilter) {
		return xXRoadConstructionBDao.find(queryFilter);
	}

	@Override
	public Page<XXRoadConstructionB> findXXRoadConstructionBs(Page<XXRoadConstructionB> page,
			QueryFilter queryFilter) {
		return xXRoadConstructionBDao.findPage(page, queryFilter);
	}

	@Override
	public XXRoadConstructionB getXXRoadConstructionB(String id) {
		return xXRoadConstructionBDao.get(id);
	}

	@Override
	public void saveXXRoadConstructionB(XXRoadConstructionB XXRoadConstructionB) {
		xXRoadConstructionBDao.save(XXRoadConstructionB);
	}

	@Override
	public boolean deleteXXRoadConstructionB(String id) {
		xXRoadConstructionBDao.delete(id);
		return true;
	}

	
	/**
	 * checkYear:
	 * 适用:验证县乡公路中的年份唯一
	 * @return 
	 * @exception 
	 * @since  1.0.0
	*/
	@Override
	public Boolean checkYear(String year, String id) {
		return xXRoadConstructionBDao.checkProperty("year", year, id);
	}

}
